﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using PowerCreator.LMS.Course.Entity;
using PowerCreator.LMS.Web.Course;

public partial class Theme_3_CheckGrade : PowerCreator.LMS.Web.Base.BasePage
{
    PowerCreator.LMS.Web.Grade.GradeManager op = new PowerCreator.LMS.Web.Grade.GradeManager();
    public string _contentID = "0";
    public string showSkillType = "";

    protected string _ChannelName = string.Empty;
    protected string _Author = string.Empty;
    //protected string _Description = string.Empty;
    //protected string _Title = string.Empty;
    //protected string _contentID = string.Empty;

    protected PowerCreator.LMS.Web.Config.WebConfig config = new PowerCreator.LMS.Web.Config.WebConfig();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["ContentID"] != null)
            _contentID = Request.QueryString["ContentID"].ToString();
        ViewState["ContentID"] = _contentID;

        if (Request.QueryString["ChannelName"] != null)
        {
            _ChannelName = Request.QueryString["ChannelName"].ToString();
            ViewState["ChannelName"] = _ChannelName;
            _Author = Request.QueryString["Author"].ToString();
            ViewState["Author"] = _Author;
            //_Description = Request.QueryString["Description"].ToString();
            //ViewState["Description"] = _Description;
            //_Title = Request.QueryString["Title"].ToString();
            //ViewState["Title"] = _Title;
        }

        if (!IsPostBack)
        {

            BinderPage();
            BinderRPT();

        }
    }

    private void BinderPage()
    {
        lbl_ResourceName.Text = _ChannelName;
        lbl_ResourceAuthor.Text = _Author;
    }
    private void BinderRPT()
    {
        DataTable dt = new DataTable();
        dt = op.QuerySkillType("");
        rpt_SkillType.DataSource = dt;
        rpt_SkillType.DataBind();

    }



    protected void btnCloseMe_ServerClick(object sender, EventArgs e)
    {
        PowerCreator.LMS.Common.Script.Script.CloseMe();
    }

    private void BinderUL()
    {
        DataTable dt = new DataTable();
        dt = op.QuerySkillType("");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            showSkillType += "<li id=\"li_user\">";
            showSkillType += "<a style=\"cursor: hand;\" href=\"ShowSkill.aspx?ContentID=" + _contentID + "&typeID=" + dt.Rows[i]["SkillTypeID"].ToString() + "\" target=\"ShowSkill\">";
            showSkillType += dt.Rows[i]["SkillTypeName"].ToString();
            showSkillType += "</a></li>";
        }
    }
}
